<{include file="common/header.tpl"}>
<link rel="stylesheet" href="<{$smarty.const._CDN_}>/resource/wei/css/style.css?<{$versionCode}>">
<style>
.btns { margin: 2em 1em; }
.btns a { padding: 6px 20px; background-color: #01d093; border: 1px solid green; color: #eee; }
.orderBox { padding: 1em; }
.orderActions { margin: 0.5em 1em; padding: 1em; background-color: #eee; color: #900; font-size: 14px; border: 1px solid #ddd; }
.orderActions form p { line-height: 3em; }
.orderActions form select { padding: 3px 5px; }
.orderActions form label { display: inline-block; width: 90px; text-align: right; padding-right: 1em;  }
.orderActions .deliverNo input { color: #090; font-size: 14px; }
.orderActions .refundMoney { display: none;}
.orderActions .refundMoney input { color: #090; font-size: 14px; }
</style>
<script>
function order_status_changed(item)
{
    var val = $(item).val();
    if (val == 2)
    {
        $('.deliverNo').show();
        $('.refundMoney').hide();
    }
    else if (val == 6)
    {
        $('.deliverNo').hide();
        $('.refundMoney').show();
    }
    else
    {
        $('.deliverNo').hide();
        $('.refundMoney').hide();
    }
}
</script>

<div class="btns"><a href="javascript:history.go(-1)">返回上一页</a></div>

<div class="orderBox">
	<div class="order-detail-header">
	    <{foreach from=$order.arrGoodsInfo item="goods"}>
	    <div class="left"><img class="img" src="<{$goods.goods.thumbsrc}>"></div>
	    <div class="right">
	                <p class="line"><{$goods.goods.name}></p>
	                <p class="line"><{$goods.goods.attr.desc}></p>
	                <p class="line">￥<{$goods.price/100|number_format:2}> x <{$goods.quantity}>件</p></div>
	    <{/foreach}>
	</div>
	
	<div class="order-detail-xijie">
	
	   <p class="line">下单时间: <{"Y-m-d H:i:s"|@date:$order.created}></p>
	   <p class="line">订单编号: <{$order.orderNo}></p>
	   <p class="line">订单金额: <span class="red">￥<{$order.moneyTotal/100|number_format:2}></span><span class="gray"> &nbsp; &nbsp;(含运费: ￥<{$order.moneyDeliver/100|number_format:2}>)</span></p>
	   <p class="line">余额抵扣: <span class="red">￥<{$order.moneyCoin/100|number_format:2}></span></p>
	   <p class="line">支付方式: <{$order.paymentName}></span></p>
	
	</div>
	
	<div class="order-detail-xinxi">
	
	    <p class="line">收货人: <{$order.addrUserName}> <{$order.addrTelNumber}></p>
	    <p class="line">收货地址: <{$order.addrDetailInfo}></p>
	    <p class="line">运送方式: <{$order.deliverName}>(费用: ￥<{$order.moneyDeliver/100|number_format:2}>)</p>
	
	</div>
	
	<div class="order-detail-status">
	    <h3 class="title">订单状态: <{$order.statusName}></h3>
	</div>

</div>

<div class="orderActions">
    <form action="" method="POST">
        <p>
            <label>修改状态: </label>
            <select name="statusId" onChange="order_status_changed(this)">
                <{foreach from=$statusList key=stId item=stName}>                
                <option value="<{$stId}>"><{$stName}></option>
                <{/foreach}>
            </select>
        </p>
        <p class="deliverNo">
            <label>快递单号: </label>
            <input type="text" name="deliverNo" value="<{$order.deliverNo}>">
        </p>
        <p class="refundMoney">
            <label>退款金额: </label>
            <input type="text" name="moneyRefund" value="<{$moneyRefund/100|number_format:2}>">
        </p>
        <p>
            <label>&nbsp;</label>
            <input type="submit" name="submit_op" value="修改">
        </p>
    </form>
</div>

<div class="btns"><a href="javascript:history.go(-1)">返回上一页</a></div>


<{include file="common/footer.tpl"}>
